package com.system.registrationPool.feign;

import com.system.registrationPool.bean.Employee;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @className: EmployeeServiceFeign
 * @description: TODO 类描述
 * @author: Li Chuanwei
 * @date: 2023/12/10 20:24
 **/
@FeignClient(value = "employee-service", path = "/employee")
public interface EmployeeServiceFeign {

    @PostMapping("/save")
    boolean saveHandle(@RequestBody Employee employee);

    @DeleteMapping("/del/{id}")
    boolean deleteHandle(@PathVariable("id") int id);

    @PutMapping("/update")
    boolean updateHandle(@RequestBody Employee employee);

    @GetMapping("/get/{id}")
    Employee getHandle(@PathVariable("id") int id);

    @GetMapping("/get/list")
    List<Employee> listHandle();
}
